<template>
  <view class="h-con h-flex">
    <view class="flex-1" v-if="tarTab > -1">
      <qs-tab-swiper
        :tarTab="tarTab"
        :tabs="tabs"
        :config="{
          apiName: 'data/auth/list/trade_order',
          type: 'order',
        }"
      />
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      tarTab: -1,
      tabs: [
        {
          name: "全部",
        },
        {
          name: "待支付",
          params: {
            status: 0,
          },
        },
        {
          name: "进行中",
          params: {
            status: [1, 2, 3, 4, 7], // 备货中 待发货 已发货 待签收 转售中
          },
        },
        {
          name: "已完成",
          params: {
            status: [6, 8, 11, 12, 21, 31], // 已签收 已转售 退款中 已退款 已取消 已认养
          },
        },
      ],
    };
  },
  onLoad({ idx = 0 }) {
    this.tarTab = idx * 1;
  },
  methods: {},
};
</script>
